import json

import requests

import hashlib

# url = "https://fanyi.baidu.com/sug"
#
# data = {
#     "kw": "狗"
# }
# resp = requests.post(url, data=data)

# https://spp.admin.sls.jbbks.com/product/commodityList
# Test
# aa123456

# 中拍
# https://paimai.caa123.org.cn/shop/index.html?1751358300477#503
# rhz2024
# 327545


# 拍品详情
# url = "https://paimai.caa123.org.cn/paimai-web/lot/3436458"

url_login = "https://paimai.caa123.org.cn/wms/login"

headers = {
    "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36",
    "content-type": "application/json;charset=UTF-8",
}
# data.username = name;
# data.password = $.md5(
# pass);
# data.code = code;
# data.uuid = PAGE_LOGIN_DATA.random;

username = "rhz2024"
password = "327545"
# password = "465656gg"

md5_hash = hashlib.md5(password.encode('utf-8'))

# print(md5_hash.hexdigest().upper())

data = {
    "username": username,
    "password": md5_hash.hexdigest(),
    "code": "",
    "uuid": "web-c143-5d34-4fd6-9c49-582789be123c",
}

data = json.dumps(data)

resp = requests.post(url_login, headers=headers, data=data)

print(resp.text)
